package com.starlz.jpa.dao;

import com.starlz.jpa.entity.LocalUser;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

/**
 * @Description:
 * @Author: wangzi
 * @Date: 2018/11/20 09:44
 */
@Repository
public interface UserDao extends JpaRepository<LocalUser,String> {


    @Override
    Page<LocalUser> findAll(Pageable pageable);

    @Override
    Optional<LocalUser> findById(String id);

    LocalUser findByUsername(String username);

    @Override
    <S extends LocalUser> S save(S entity);
}
